package com.alibaba.otter.manager.web.dto;

import com.alibaba.otter.manager.web.dto.group.UserGroup;
import com.alibaba.otter.manager.web.utils.BeanValidator;
import com.alibaba.otter.manager.web.valiadator.annotation.OpGroup;
import com.alibaba.otter.shared.common.model.user.AuthorizeType;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;

@Setter
@Getter
@NoArgsConstructor
public class UserDTO {

    @NotNull(message = "用户标识不能为空", groups = {UserGroup.Edit.class})
    private Long id;

    @NotBlank(message = "登录名不能为空", groups = {UserGroup.Add.class, UserGroup.Edit.class, UserGroup.Login.class})
    private String name;

    @NotBlank(message = "密码不能为空", groups = {UserGroup.Add.class, UserGroup.Edit.class, UserGroup.Login.class})
    private String password;

    private String rePassword;

    private String department;

    private String realName;

    @NotNull(message = "授权类型不能空",groups = {UserGroup.Add.class,UserGroup.Edit.class})
    private AuthorizeType authorizeType;
}
